<?php

if (!isset($css) || !is_array($css)){
    $css = array();
}

if (!isset($js) || !is_array($js)){
    $js = array();
}

if (!isset($title)){
    $title = str_replace("_"," ",strtoupper($this->router->fetch_class()));
}

$this->load->view('includes/header',array("title"=>$title, "css"=>$css, "js"=>$js));

echo "<noscript>";
echo "<div id='menuBarNojs'><div class='wrap'></div></div>";
echo "<div id='pageNojs' class='wrap'>";
echo "<div id='mainContentNojs' class='centered'>
    <img src='".base_url()."img/alert.png' alt='Enable Javascript'/>
    <h1>Enable Javascript to use this site</h1>
    </div>";
echo "</div>";
echo "</noscript>";

echo "<div id='body'>";
$this->load->view('includes/menu');



echo '<div id="page" class="wrap">';

echo '<div class="push"></div>';
    
if ($this->router->fetch_class() != "home"){
    echo "<div class='heading_title'>$title</div>";
}
echo '<div id="mainContent">';

$this->load->view($view, $data);

echo '</div></div></div>';

$this->load->view('includes/footer');